
<?php
echo "<script type=\"text/javascript\" src=\"http://{$_SERVER['SERVER_NAME']}/modules/welcome/welcome.js\"></script>";
echo "<div  class=\"{$class}\">";

if(!isset($_SESSION)) @session_start();
$welcome_file = "{$_SERVER["DOCUMENT_ROOT"]}/modules/welcome/welcome.html";

if (isset($_SESSION["username"])) {

    ?>
<script type="text/javascript">
if (! htmlView) $.getScript("/modules/htmlView/htmlView.js");
_welcome_htmlView = new htmlView ("welcome_area",null,50);
</script>

<?php
//echo <<<STOP
//<script type="text/javascript" src="http://{$_SERVER['SERVER_NAME']}/modules/general/jquery-1.6.min.js"></script>
//<link rel="stylesheet" type="text/css" href="http://{$_SERVER['SERVER_NAME']}/modules/editor/js/cleditor/jquery.cleditor.css" />
//<script type="text/javascript" src="http://{$_SERVER['SERVER_NAME']}/modules/editor/js/cleditor/jquery.cleditor.min.js"></script>
//<script type="text/javascript" src="http://{$_SERVER['SERVER_NAME']}/modules/welcome/welcome.js"></script>
//STOP;
    
    
    
echo "<div id=welcome_area contenteditable onclick=\"dsq_welcome.edit.initialize()\">";
include $welcome_file;
echo "</div>";
echo "<button id=btn_save_welcome onclick=\"dsq_welcome.save()\">Save</button>";
?>
<script type="text/javascript">
   //$(document).ready(function() {
  //      $("#welcome_area").click (function () {
            
  //          dsq_welcome.edit.initialize();
         
   //     });
   //   }); 
</script> 
<?php

} else  include $welcome_file;

echo "</div>";
?>
